/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.click.app.webapp.util;

import java.util.Date;

/**
 *
 * @author orgale
 */
public class Utilities {

    public static String convertDate(Date d){
        String dc = "";
        dc+= dayConverter(d.getDay())+" ";
        dc+= d.getDate()+"/";
        int mes = d.getMonth()+1;
        dc+= mes+"/";
        int y = d.getYear()+1900;
        dc+= y;
        return dc;
    }

        public static String dayConverter(int d) {
        if (d == 0) {
            return "Domingo";
        }
        if (d == 1) {
            return "Lunes";
        }
        if (d == 2) {
            return "Martes";
        }
        if (d == 3) {
            return "Miercoles";
        }
        if (d == 4) {
            return "Jueves";
        }
        if (d == 5) {
            return "Viernes";
        }
        if (d == 6) {
            return "Sabado";
        } else {
            return null;
        }

    }
}
